#pragma once
#include "stdafx.h"
#include "testing.h"

/*
There is a lot of identical code between our different chart classes. In
particular they all have in common a title and two functions called writeAsHTML. Design a base class and extend it for each chart. Draw a UML diagram
of the resulting hierarchy. 
 */
class BaseChart {
public:
    /*  Virtual destructor */
    virtual ~BaseChart() {};
    /*  Use getter and setter methods to access the title. */
    virtual void setTitle(const std::string &title) = 0;
    virtual std::string getTitle() = 0;
    /*  Calculate the payoff of the option given
        a history of prices */
    virtual void writeAsHTML(std::ostream& out) const=0;
    virtual void writeAsHTML(const std::string& file) const=0;
    //std::string title;
private:
    std::string title;
};